<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爵士音乐会，沉醉于蓝调之夜 - 心动社交</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        /* 基础样式 */
        body {
            font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
            background-color: #f8f9fa;
            color: #333;
            line-height: 1.6;
        }
        
        /* 导航栏样式 */
        .navbar {
            background-color: white;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            padding: 0.8rem 0;
        }
        
        .logo {
            font-weight: 700;
            font-size: 1.5rem;
            color: #ff4d6d;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .nav-link {
            color: #555;
            font-weight: 500;
            transition: color 0.2s;
        }
        
        .nav-link:hover, .nav-link.active {
            color: #ff4d6d;
        }
        
        /* 主内容区样式 */
        .main-content {
            padding: 2rem 0;
        }
        
        /* 活动标题区 */
        .event-header {
            margin-bottom: 2rem;
        }
        
        .event-category {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 500;
            margin-bottom: 1rem;
        }
        
        .event-title {
            font-weight: 800;
            font-size: 2rem;
            margin-bottom: 1rem;
            color: #2d3748;
        }
        
        .event-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            color: #6b7280;
            margin-bottom: 1rem;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        /* 图片展示区 */
        .event-gallery {
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 2rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        
        .main-image {
            width: 100%;
            height: 450px;
            position: relative;
            overflow: hidden;
        }
        
        .main-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        
        .main-image:hover img {
            transform: scale(1.03);
        }
        
        .image-thumbnails {
            display: flex;
            gap: 8px;
            padding: 10px;
            background-color: white;
            overflow-x: auto;
        }
        
        .image-thumb {
            width: 100px;
            height: 70px;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            opacity: 0.7;
            transition: all 0.3s;
            flex-shrink: 0;
        }
        
        .image-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .image-thumb:hover, .image-thumb.active {
            opacity: 1;
            transform: translateY(-3px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        /* 活动详情区 */
        .event-details {
            background-color: white;
            border-radius: 12px;
            padding: 1.75rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            margin-bottom: 2rem;
        }
        
        .section-title {
            font-weight: 700;
            font-size: 1.3rem;
            margin-bottom: 1.25rem;
            color: #1f2937;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid #f3f4f6;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .event-description {
            line-height: 1.8;
            color: #4b5563;
            margin-bottom: 1.5rem;
        }
        
        .detail-list {
            list-style: none;
            padding: 0;
            margin-bottom: 1.5rem;
        }
        
        .detail-list li {
            padding: 0.75rem 0;
            border-bottom: 1px solid #f3f4f6;
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }
        
        .detail-list li:last-child {
            border-bottom: none;
        }
        
        .detail-list .icon {
            color: #ff4d6d;
            margin-top: 4px;
            flex-shrink: 0;
        }
        
        .detail-list .label {
            font-weight: 600;
            min-width: 100px;
            color: #1f2937;
        }
        
        .detail-list .value {
            flex: 1;
            color: #4b5563;
        }
        
        /* 发起人信息 */
        .host-info {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 1rem;
            background-color: #fff5f7;
            border-radius: 10px;
            margin-bottom: 1.5rem;
        }
        
        .host-avatar {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid white;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        .host-details {
            flex: 1;
        }
        
        .host-name {
            font-weight: 600;
            font-size: 1.1rem;
            margin-bottom: 5px;
            color: #1f2937;
        }
        
        .host-meta {
            color: #6b7280;
            font-size: 0.9rem;
            margin-bottom: 8px;
        }
        
        .host-rating {
            color: #f59e0b;
            font-size: 0.9rem;
        }
        
        /* 侧边栏 */
        .sidebar {
            position: sticky;
            top: 2rem;
        }
        
        /* 参与卡片 */
        .participation-card {
            background-color: white;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            margin-bottom: 1.5rem;
        }
        
        .price-info {
            text-align: center;
            margin-bottom: 1.5rem;
        }
        
        .price-label {
            color: #6b7280;
            font-size: 0.9rem;
            margin-bottom: 5px;
        }
        
        .price-value {
            font-size: 2.2rem;
            font-weight: 800;
            color: #ff4d6d;
        }
        
        .action-buttons {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }
        
        .btn-join {
            background-color: #ff4d6d;
            color: white;
            border: none;
            padding: 0.8rem;
            font-weight: 600;
            border-radius: 8px;
            transition: all 0.3s;
        }
        
        .btn-join:hover {
            background-color: #f04262;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255,77,109,0.3);
        }
        
        .btn-share {
            background-color: #f3f4f6;
            color: #4b5563;
            border: none;
            padding: 0.8rem;
            font-weight: 600;
            border-radius: 8px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .btn-share:hover {
            background-color: #e5e7eb;
            transform: translateY(-2px);
        }
        
        .participation-stats {
            display: flex;
            justify-content: space-between;
            text-align: center;
            padding-top: 1rem;
            border-top: 1px solid #f3f4f6;
        }
        
        .stat-box {
            flex: 1;
        }
        
        .stat-value {
            font-weight: 700;
            font-size: 1.25rem;
            color: #1f2937;
            margin-bottom: 3px;
        }
        
        .stat-label {
            font-size: 0.85rem;
            color: #6b7280;
        }
        
        /* 参与者列表 */
        .participants-list {
            background-color: white;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            margin-bottom: 1.5rem;
        }
        
        .participant {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 0.75rem 0;
            border-bottom: 1px solid #f3f4f6;
        }
        
        .participant:last-child {
            border-bottom: none;
        }
        
        .participant-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .participant-info {
            flex: 1;
        }
        
        .participant-name {
            font-weight: 500;
            color: #1f2937;
            margin-bottom: 2px;
        }
        
        .participant-meta {
            font-size: 0.8rem;
            color: #6b7280;
        }
        
        .participant-actions {
            color: #6b7280;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .participant-actions:hover {
            color: #ff4d6d;
        }
        
        /* 留言区 */
        .comments-section {
            background-color: white;
            border-radius: 12px;
            padding: 1.75rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            margin-bottom: 2rem;
        }
        
        .comments-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .comments-count {
            font-weight: 600;
            color: #1f2937;
        }
        
        .sort-comments {
            color: #6b7280;
            font-size: 0.9rem;
            cursor: pointer;
        }
        
        .comment-form {
            display: flex;
            gap: 12px;
            margin-bottom: 2rem;
        }
        
        .user-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
        }
        
        .comment-input-container {
            flex: 1;
        }
        
        .comment-input {
            width: 100%;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 12px 15px;
            resize: none;
            font-family: inherit;
            transition: all 0.3s;
            margin-bottom: 10px;
        }
        
        .comment-input:focus {
            outline: none;
            border-color: #ff4d6d;
            box-shadow: 0 0 0 3px rgba(255,77,109,0.1);
        }
        
        .comment-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        
        .btn-cancel {
            background: none;
            border: none;
            color: #6b7280;
            padding: 5px 15px;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .btn-cancel:hover {
            color: #4b5563;
        }
        
        .btn-post {
            background-color: #ff4d6d;
            color: white;
            border: none;
            padding: 6px 18px;
            border-radius: 6px;
            font-weight: 500;
            transition: all 0.2s;
        }
        
        .btn-post:hover {
            background-color: #f04262;
        }
        
        /* 留言列表 */
        .comments-list {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        .comment-item {
            display: flex;
            gap: 12px;
        }
        
        .comment-content {
            flex: 1;
        }
        
        .comment-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
        }
        
        .comment-author {
            font-weight: 600;
            color: #1f2937;
        }
        
        .comment-time {
            font-size: 0.8rem;
            color: #9ca3af;
        }
        
        .comment-text {
            background-color: #f9fafb;
            padding: 12px 15px;
            border-radius: 8px;
            margin-bottom: 8px;
            color: #4b5563;
        }
        
        .comment-actions {
            display: flex;
            gap: 15px;
            font-size: 0.85rem;
        }
        
        .comment-action {
            color: #6b7280;
            cursor: pointer;
            transition: color 0.2s;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .comment-action:hover {
            color: #ff4d6d;
        }
        
        .comment-action.liked {
            color: #ff4d6d;
        }
        
        /* 回复区 */
        .replies {
            margin-top: 1rem;
            margin-left: 2.5rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .reply-item {
            display: flex;
            gap: 10px;
        }
        
        .reply-content {
            flex: 1;
        }
        
        .reply-text {
            background-color: #f3f4f6;
            padding: 8px 12px;
            border-radius: 6px;
            margin-bottom: 5px;
            font-size: 0.95rem;
            color: #4b5563;
        }
        
        .reply-form {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        
        .reply-input {
            flex: 1;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 8px 12px;
            resize: none;
            font-family: inherit;
            font-size: 0.9rem;
            transition: all 0.3s;
        }
        
        .reply-input:focus {
            outline: none;
            border-color: #ff4d6d;
        }
        
        .btn-reply {
            background-color: #ff4d6d;
            color: white;
            border: none;
            padding: 5px 12px;
            border-radius: 6px;
            font-size: 0.9rem;
            transition: all 0.2s;
        }
        
        .btn-reply:hover {
            background-color: #f04262;
        }
        
        /* 相关活动 */
        .related-events {
            background-color: white;
            border-radius: 12px;
            padding: 1.75rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }
        
        .events-slider {
            display: flex;
            gap: 1.5rem;
            overflow-x: auto;
            padding-bottom: 1rem;
        }
        
        .event-card {
            min-width: 280px;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            transition: transform 0.3s ease;
        }
        
        .event-card:hover {
            transform: translateY(-5px);
        }
        
        .event-card-img {
            height: 160px;
            overflow: hidden;
        }
        
        .event-card-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        
        .event-card:hover .event-card-img img {
            transform: scale(1.05);
        }
        
        .event-card-content {
            padding: 1rem;
        }
        
        .event-card-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: #1f2937;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .event-card-meta {
            font-size: 0.85rem;
            color: #6b7280;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        /* 分类颜色 */
        .cat-music { background-color: #ffe8cc; color: #c05700; }
        .cat-food { background-color: #fff3cd; color: #856404; }
        .cat-movie { background-color: #d1ecf1; color: #0c5460; }
        .cat-sport { background-color: #d4edda; color: #155724; }
        .cat-art { background-color: #f8d7da; color: #721c24; }
        .cat-travel { background-color: #e0cffc; color: #5a2ca0; }
        .cat-study { background-color: #ccfbf1; color: #065f46; }
        
        /* 响应式调整 */
        @media (max-width: 992px) {
            .main-image {
                height: 350px;
            }
        }
        
        @media (max-width: 768px) {
            .event-title {
                font-size: 1.6rem;
            }
            
            .main-image {
                height: 300px;
            }
            
            .detail-list li {
                flex-direction: column;
            }
            
            .detail-list .label {
                min-width: auto;
                margin-bottom: 5px;
            }
            
            .replies {
                margin-left: 1.5rem;
            }
        }
        
        @media (max-width: 576px) {
            .event-title {
                font-size: 1.4rem;
            }
            
            .event-meta {
                gap: 1rem;
            }
            
            .main-image {
                height: 250px;
            }
            
            .image-thumb {
                width: 80px;
                height: 60px;
            }
            
            .host-info {
                flex-direction: column;
                text-align: center;
            }
            
            .event-card {
                min-width: 240px;
            }
            
            .section-title {
                font-size: 1.15rem;
            }
        }
        
        /* 动画效果 */
        .fade-in {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }
        
        /* 已参加状态样式 */
        .joined-badge {
            position: absolute;
            top: 20px;
            right: 20px;
            background-color: #28a745;
            color: white;
            padding: 8px 15px;
            border-radius: 6px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(40,167,69,0.3);
            z-index: 10;
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a href="#" class="logo">
                <i class="fas fa-heart"></i>
                <span>心动社交</span>
            </a>
            
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent">
                <i class="fas fa-bars"></i>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarContent">
                <ul class="navbar-nav ms-auto gap-4">
                    <li class="nav-item">
                        <a href="#" class="nav-link">首页</a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link active">约会列表</a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link">附近的人</a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link">消息</a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="btn btn-danger">
                            <i class="fas fa-plus me-1"></i> 发起约会
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    
    <!-- 主内容区 -->
    <div class="container main-content">
        <div class="row">
            <!-- 左侧主内容 -->
            <div class="col-lg-8">
                <!-- 活动标题和基本信息 -->
                <div class="event-header fade-in">
                    <span class="event-category cat-music">音乐演出</span>
                    <h1 class="event-title">爵士音乐会，沉醉于蓝调之夜</h1>
                    
                    <div class="event-meta">
                        <div class="meta-item">
                            <i class="fas fa-calendar-alt"></i>
                            <span>2023年10月15日 19:30</span>
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-map-marker-alt"></i>
                            <span>蓝调爵士俱乐部</span>
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-ticket-alt"></i>
                            <span>免费入场</span>
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-user-friends"></i>
                            <span>已有42人参加</span>
                        </div>
                    </div>
                </div>
                
                <!-- 活动图片展示 -->
                <div class="event-gallery fade-in">
                    <div class="main-image">
                        <img src="https://picsum.photos/1200/600?random=10" alt="爵士音乐会现场" id="mainImage">
                        <div class="distance-badge" style="top: 15px; left: 15px;">2.5km 距离</div>
                    </div>
                    
                    <div class="image-thumbnails">
                        <div class="image-thumb active">
                            <img src="https://picsum.photos/1200/600?random=10" alt="爵士音乐会现场" data-img="https://picsum.photos/1200/600?random=10">
                        </div>
                        <div class="image-thumb">
                            <img src="https://picsum.photos/1200/600?random=11" alt="音乐会舞台" data-img="https://picsum.photos/1200/600?random=11">
                        </div>
                        <div class="image-thumb">
                            <img src="https://picsum.photos/1200/600?random=12" alt="钢琴演奏" data-img="https://picsum.photos/1200/600?random=12">
                        </div>
                        <div class="image-thumb">
                            <img src="https://picsum.photos/1200/600?random=13" alt="观众席" data-img="https://picsum.photos/1200/600?random=13">
                        </div>
                        <div class="image-thumb">
                            <img src="https://picsum.photos/1200/600?random=14" alt="现场饮品" data-img="https://picsum.photos/1200/600?random=14">
                        </div>
                    </div>
                </div>
                
                <!-- 活动详情 -->
                <div class="event-details fade-in">
                    <h2 class="section-title">
                        <i class="fas fa-info-circle"></i> 活动详情
                    </h2>
                    
                    <p class="event-description">
                        本周周五晚，downtown爵士俱乐部将举办一场精彩的爵士乐演出。我们邀请了城中著名的钢琴家张爵士和萨克斯手李蓝调，为大家带来一场难忘的音乐盛宴。无论你是爵士乐迷，还是想体验轻松氛围的新朋友，都欢迎加入我们！
                    </p>
                    
                    <p class="event-description">
                        现场将提供免费的软饮和小食，气氛轻松愉快，非常适合认识新朋友。建议穿着休闲舒适，带上你的好心情来享受这美好的音乐之夜。
                    </p>
                    
                    <ul class="detail-list">
                        <li>
                            <div class="icon"><i class="fas fa-clock"></i></div>
                            <div class="label">活动时间</div>
                            <div class="value">2023年10月15日（周五）19:30 - 22:30</div>
                        </li>
                        <li>
                            <div class="icon"><i class="fas fa-map-marker-alt"></i></div>
                            <div class="label">活动地点</div>
                            <div class="value">蓝调爵士俱乐部（ downtown文化街88号）</div>
                        </li>
                        <li>
                            <div class="icon"><i class="fas fa-subway"></i></div>
                            <div class="label">交通方式</div>
                            <div class="value">地铁3号线文化街站D口出，步行5分钟即达</div>
                        </li>
                        <li>
                            <div class="icon"><i class="fas fa-ticket-alt"></i></div>
                            <div class="label">费用说明</div>
                            <div class="value">免费入场，饮品可自愿消费（均价30元/杯）</div>
                        </li>
                        <li>
                            <div class="icon"><i class="fas fa-user-check"></i></div>
                            <div class="label">参与人数</div>
                            <div class="value">限60人（目前已报名42人）</div>
                        </li>
                        <li>
                            <div class="icon"><i class="fas fa-info-circle"></i></div>
                            <div class="label">注意事项</div>
                            <div class="value">
                                1. 请提前15分钟到场签到<br>
                                2. 演出期间请保持安静<br>
                                3. 可自带朋友参加，但需提前告知
                            </div>
                        </li>
                    </ul>
                    
                    <!-- 发起人信息 -->
                    <h2 class="section-title">
                        <i class="fas fa-user"></i> 活动发起人
                    </h2>
                    
                    <div class="host-info">
                        <img src="https://picsum.photos/200/200?random=102" alt="李明的头像" class="host-avatar">
                        <div class="host-details">
                            <div class="host-name">李明</div>
                            <div class="host-meta">爵士乐爱好者 · 已发起23场活动 · 加入3年</div>
                            <div class="host-rating">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star-half-alt"></i>
                                <span class="ms-1">4.8 (126条评价)</span>
                            </div>
                        </div>
                        <button class="btn btn-outline-danger">
                            <i class="fas fa-user-plus me-1"></i> 关注
                        </button>
                    </div>
                </div>
                
                <!-- 留言区 -->
                <div class="comments-section fade-in">
                    <h2 class="section-title">
                        <i class="fas fa-comments"></i> 留言讨论
                    </h2>
                    
                    <div class="comments-header">
                        <div class="comments-count">78条留言</div>
                        <div class="sort-comments">
                            <i class="fas fa-sort me-1"></i> 最新优先
                        </div>
                    </div>
                    
                    <!-- 留言输入框 -->
                    <div class="comment-form">
                        <img src="https://picsum.photos/200/200?random=999" alt="当前用户头像" class="user-avatar">
                        <div class="comment-input-container">
                            <textarea class="comment-input" rows="3" placeholder="分享你的想法..."></textarea>
                            <div class="comment-actions">
                                <button class="btn-cancel">取消</button>
                                <button class="btn-post">发布留言</button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 留言列表 -->
                    <div class="comments-list">
                        <!-- 留言1 -->
                        <div class="comment-item">
                            <img src="https://picsum.photos/200/200?random=201" alt="用户头像" class="user-avatar">
                            <div class="comment-content">
                                <div class="comment-header">
                                    <div class="comment-author">张小乐</div>
                                    <div class="comment-time">2小时前</div>
                                </div>
                                <div class="comment-text">
                                    这个爵士乐演出太棒了！上次去看了张爵士的演出，简直是听觉盛宴，这次一定不会错过！有一起的朋友吗？
                                </div>
                                <div class="comment-actions">
                                    <div class="comment-action">
                                        <i class="far fa-heart"></i>
                                        <span>24</span>
                                    </div>
                                    <div class="comment-action reply-btn">
                                        <i class="far fa-comment"></i>
                                        <span>回复</span>
                                    </div>
                                </div>
                                
                                <!-- 回复区 -->
                                <div class="replies">
                                    <!-- 回复1 -->
                                    <div class="reply-item">
                                        <img src="https://picsum.photos/200/200?random=202" alt="用户头像" class="user-avatar" style="width: 36px; height: 36px;">
                                        <div class="reply-content">
                                            <div class="comment-header">
                                                <div class="comment-author">王小美</div>
                                                <div class="comment-time">1小时前</div>
                                            </div>
                                            <div class="reply-text">
                                                我也打算去！可以一起呀，我对爵士乐很感兴趣但了解不多，希望能多学习一些~
                                            </div>
                                            <div class="comment-actions">
                                                <div class="comment-action">
                                                    <i class="far fa-heart"></i>
                                                    <span>8</span>
                                                </div>
                                                <div class="comment-action reply-btn">
                                                    <i class="far fa-comment"></i>
                                                    <span>回复</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    <!-- 回复输入框 -->
                                    <div class="reply-form" style="display: none;">
                                        <textarea class="reply-input" rows="2" placeholder="回复张小乐..."></textarea>
                                        <button class="btn-reply">回复</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 留言2 -->
                        <div class="comment-item">
                            <img src="https://picsum.photos/200/200?random=203" alt="用户头像" class="user-avatar">
                            <div class="comment-content">
                                <div class="comment-header">
                                    <div class="comment-author">李强</div>
                                    <div class="comment-time">昨天 18:45</div>
                                </div>
                                <div class="comment-text">
                                    请问现场有停车场吗？打算开车过去，但不太熟悉那边的停车情况。
                                </div>
                                <div class="comment-actions">
                                    <div class="comment-action">
                                        <i class="far fa-heart"></i>
                                        <span>5</span>
                                    </div>
                                    <div class="comment-action reply-btn">
                                        <i class="far fa-comment"></i>
                                        <span>回复</span>
                                    </div>
                                </div>
                                
                                <!-- 回复区 -->
                                <div class="replies">
                                    <!-- 发起人回复 -->
                                    <div class="reply-item">
                                        <img src="https://picsum.photos/200/200?random=102" alt="李明的头像" class="user-avatar" style="width: 36px; height: 36px;">
                                        <div class="reply-content">
                                            <div class="comment-header">
                                                <div class="comment-author">
                                                    李明 <span class="badge bg-danger text-white" style="font-size: 0.7rem; margin-left: 5px;">发起人</span>
                                                </div>
                                                <div class="comment-time">昨天 19:12</div>
                                            </div>
                                            <div class="reply-text">
                                                俱乐部门口有少量停车位，但比较紧张。建议停在旁边的文化街停车场，步行3分钟即可到达，晚上8点后停车费有折扣。
                                            </div>
                                            <div class="comment-actions">
                                                <div class="comment-action">
                                                    <i class="far fa-heart"></i>
                                                    <span>12</span>
                                                </div>
                                                <div class="comment-action reply-btn">
                                                    <i class="far fa-comment"></i>
                                                    <span>回复</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    <!-- 回复输入框 -->
                                    <div class="reply-form" style="display: none;">
                                        <textarea class="reply-input" rows="2" placeholder="回复李强..."></textarea>
                                        <button class="btn-reply">回复</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 留言3 -->
                        <div class="comment-item">
                            <img src="https://picsum.photos/200/200?random=204" alt="用户头像" class="user-avatar">
                            <div class="comment-content">
                                <div class="comment-header">
                                    <div class="comment-author">赵音乐</div>
                                    <div class="comment-time">3天前</div>
                                </div>
                                <div class="comment-text">
                                    李蓝调的萨克斯真的太赞了！上次在音乐节听了他的演奏，一直想再听一次现场。这次活动的时间刚好有空，一定参加！
                                </div>
                                <div class="comment-actions">
                                    <div class="comment-action liked">
                                        <i class="fas fa-heart"></i>
                                        <span>36</span>
                                    </div>
                                    <div class="comment-action reply-btn">
                                        <i class="far fa-comment"></i>
                                        <span>回复</span>
                                    </div>
                                </div>
                                
                                <!-- 回复输入框 -->
                                <div class="reply-form" style="display: none;">
                                    <textarea class="reply-input" rows="2" placeholder="回复赵音乐..."></textarea>
                                    <button class="btn-reply">回复</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 加载更多留言 -->
                    <div class="text-center mt-4">
                        <button class="btn btn-outline-secondary">
                            <i class="fas fa-spinner fa-spin me-1" style="display: none;"></i>
                            加载更多留言
                        </button>
                    </div>
                </div>
                
                <!-- 相关活动 -->
                <div class="related-events fade-in">
                    <h2 class="section-title">
                        <i class="fas fa-thumbs-up"></i> 你可能也感兴趣
                    </h2>
                    
                    <div class="events-slider">
                        <!-- 相关活动1 -->
                        <div class="event-card">
                            <div class="event-card-img">
                                <img src="https://picsum.photos/600/400?random=30" alt="古典音乐会">
                            </div>
                            <div class="event-card-content">
                                <h3 class="event-card-title">古典音乐之夜，贝多芬奏鸣曲专场</h3>
                                <div class="event-card-meta">
                                    <i class="fas fa-calendar-alt fa-sm"></i>
                                    <span>10月22日 19:00</span>
                                </div>
                                <div class="event-card-meta">
                                    <i class="fas fa-map-marker-alt fa-sm"></i>
                                    <span>城市音乐厅</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 相关活动2 -->
                        <div class="event-card">
                            <div class="event-card-img">
                                <img src="https://picsum.photos/600/400?random=31" alt="民谣现场">
                            </div>
                            <div class="event-card-content">
                                <h3 class="event-card-title">周末民谣现场，温暖你的夜晚</h3>
                                <div class="event-card-meta">
                                    <i class="fas fa-calendar-alt fa-sm"></i>
                                    <span>10月14日 20:00</span>
                                </div>
                                <div class="event-card-meta">
                                    <i class="fas fa-map-marker-alt fa-sm"></i>
                                    <span>巷子里咖啡馆</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 相关活动3 -->
                        <div class="event-card">
                            <div class="event-card-img">
                                <img src="https://picsum.photos/600/400?random=32" alt="音乐交流会">
                            </div>
                            <div class="event-card-content">
                                <h3 class="event-card-title">音乐爱好者交流会，分享你的珍藏</h3>
                                <div class="event-card-meta">
                                    <i class="fas fa-calendar-alt fa-sm"></i>
                                    <span>10月16日 14:00</span>
                                </div>
                                <div class="event-card-meta">
                                    <i class="fas fa-map-marker-alt fa-sm"></i>
                                    <span>回声书店</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 相关活动4 -->
                        <div class="event-card">
                            <div class="event-card-img">
                                <img src="https://picsum.photos/600/400?random=33" alt="唱片集市">
                            </div>
                            <div class="event-card-content">
                                <h3 class="event-card-title">黑胶唱片集市，寻找你的最爱</h3>
                                <div class="event-card-meta">
                                    <i class="fas fa-calendar-alt fa-sm"></i>
                                    <span>10月21日 10:00</span>
                                </div>
                                <div class="event-card-meta">
                                    <i class="fas fa-map-marker-alt fa-sm"></i>
                                    <span>创意园区</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 右侧边栏 -->
            <div class="col-lg-4 sidebar">
                <!-- 参与卡片 -->
                <div class="participation-card fade-in">
                    <div class="price-info">
                        <div class="price-label">活动费用</div>
                        <div class="price-value">免费</div>
                    </div>
                    
                    <div class="action-buttons">
                        <button class="btn-join">
                            <i class="fas fa-check-circle me-1"></i> 我要参加
                        </button>
                        <button class="btn-share">
                            <i class="fas fa-share-alt"></i> 分享活动
                        </button>
                    </div>
                    
                    <div class="participation-stats">
                        <div class="stat-box">
                            <div class="stat-value">42</div>
                            <div class="stat-label">已报名</div>
                        </div>
                        <div class="stat-box">
                            <div class="stat-value">60</div>
                            <div class="stat-label">名额上限</div>
                        </div>
                        <div class="stat-box">
                            <div class="stat-value">189</div>
                            <div class="stat-label">感兴趣</div>
                        </div>
                    </div>
                </div>
                
                <!-- 参与者列表 -->
                <div class="participants-list fade-in">
                    <h2 class="section-title">
                        <i class="fas fa-users"></i> 参与者 (42)
                    </h2>
                    
                    <div class="participant">
                        <img src="https://picsum.photos/200/200?random=102" alt="李明的头像" class="participant-avatar">
                        <div class="participant-info">
                            <div class="participant-name">李明 <span class="badge bg-danger text-white" style="font-size: 0.7rem;">发起人</span></div>
                            <div class="participant-meta">已发起23场活动</div>
                        </div>
                        <div class="participant-actions">
                            <i class="fas fa-user-plus"></i>
                        </div>
                    </div>
                    
                    <div class="participant">
                        <img src="https://picsum.photos/200/200?random=301" alt="用户头像" class="participant-avatar">
                        <div class="participant-info">
                            <div class="participant-name">张小乐</div>
                            <div class="participant-meta">喜欢爵士乐、摄影</div>
                        </div>
                        <div class="participant-actions">
                            <i class="fas fa-user-plus"></i>
                        </div>
                    </div>
                    
                    <div class="participant">
                        <img src="https://picsum.photos/200/200?random=302" alt="用户头像" class="participant-avatar">
                        <div class="participant-info">
                            <div class="participant-name">王小美</div>
                            <div class="participant-meta">音乐爱好者，初学钢琴</div>
                        </div>
                        <div class="participant-actions">
                            <i class="fas fa-user-plus"></i>
                        </div>
                    </div>
                    
                    <div class="participant">
                        <img src="https://picsum.photos/200/200?random=303" alt="用户头像" class="participant-avatar">
                        <div class="participant-info">
                            <div class="participant-name">赵音乐</div>
                            <div class="participant-meta">萨克斯演奏者</div>
                        </div>
                        <div class="participant-actions">
                            <i class="fas fa-user-plus"></i>
                        </div>
                    </div>
                    
                    <div class="text-center mt-2">
                        <button class="btn btn-outline-secondary btn-sm">
                            查看全部参与者
                        </button>
                    </div>
                </div>
                
                <!-- 活动提醒 -->
                <div class="participation-card fade-in">
                    <h2 class="section-title" style="font-size: 1.1rem;">
                        <i class="fas fa-bell"></i> 活动提醒
                    </h2>
                    
                    <div class="form-check mb-3">
                        <input class="form-check-input" type="checkbox" id="reminder1">
                        <label class="form-check-label" for="reminder1">
                            活动开始前1天提醒
                        </label>
                    </div>
                    
                    <div class="form-check mb-3">
                        <input class="form-check-input" type="checkbox" id="reminder2" checked>
                        <label class="form-check-label" for="reminder2">
                            活动开始前2小时提醒
                        </label>
                    </div>
                    
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" id="reminder3">
                        <label class="form-check-label" for="reminder3">
                            接收活动变更通知
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 页脚 -->
    <footer class="bg-white py-5 border-top">
        <div class="container">
            <div class="row">
                <div class="col-md-6 mb-4">
                    <div class="logo mb-3">
                        <i class="fas fa-heart"></i>
                        <span>心动社交</span>
                    </div>
                    <p class="text-muted mb-0" style="max-width: 400px;">
                        连接有趣的灵魂，发现精彩的约会。在这里，每一次相遇都是美好的开始。
                    </p>
                </div>
                
                <div class="col-md-3 mb-4">
                    <h5 class="font-weight-medium mb-3">快速链接</h5>
                    <ul class="list-unstyled">
                        <li class="mb-2"><a href="#" class="text-muted">首页</a></li>
                        <li class="mb-2"><a href="#" class="text-muted">约会推荐</a></li>
                        <li class="mb-2"><a href="#" class="text-muted">附近活动</a></li>
                        <li class="mb-2"><a href="#" class="text-muted">帮助中心</a></li>
                    </ul>
                </div>
                
                <div class="col-md-3">
                    <h5 class="font-weight-medium mb-3">联系我们</h5>
                    <ul class="list-unstyled">
                        <li class="mb-2 text-muted"><i class="fas fa-envelope me-2"></i>contact@xindong.com</li>
                        <li class="mb-2 text-muted"><i class="fas fa-phone me-2"></i>400-123-4567</li>
                    </ul>
                    <div class="mt-3">
                        <a href="#" class="text-muted me-3"><i class="fab fa-weibo"></i></a>
                        <a href="#" class="text-muted me-3"><i class="fab fa-wechat"></i></a>
                        <a href="#" class="text-muted"><i class="fab fa-instagram"></i></a>
                    </div>
                </div>
            </div>
            <div class="text-center mt-5 pt-3 border-top">
                <p class="text-muted mb-0">&copy; 2023 心动社交 - 让每次约会都充满惊喜</p>
            </div>
        </div>
    </footer>

    <!-- Bootstrap 5 JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 滚动渐入动画
            const fadeElements = document.querySelectorAll('.fade-in');
            
            const observer = new IntersectionObserver((entries) => {
                entries.forEach((entry, index) => {
                    if (entry.isIntersecting) {
                        setTimeout(() => {
                            entry.target.style.opacity = '1';
                            entry.target.style.transform = 'translateY(0)';
                        }, index * 100);
                        observer.unobserve(entry.target);
                    }
                });
            }, { threshold: 0.1 });
            
            fadeElements.forEach(el => observer.observe(el));
            
            // 图片切换功能
            const thumbnails = document.querySelectorAll('.image-thumb');
            const mainImage = document.getElementById('mainImage');
            
            thumbnails.forEach(thumb => {
                thumb.addEventListener('click', function() {
                    // 移除所有缩略图的active类
                    thumbnails.forEach(t => t.classList.remove('active'));
                    // 给当前点击的缩略图添加active类
                    this.classList.add('active');
                    // 更改主图
                    mainImage.src = this.querySelector('img').dataset.img;
                });
            });
            
            // 参加按钮功能
            const joinButton = document.querySelector('.btn-join');
            joinButton.addEventListener('click', function() {
                if (this.textContent.includes('我要参加')) {
                    if (confirm('确定要参加"爵士音乐会，沉醉于蓝调之夜"吗？')) {
                        this.innerHTML = '<i class="fas fa-check"></i> 已参加';
                        this.style.backgroundColor = '#28a745';
                        
                        // 添加已参加标记
                        const mainImageContainer = document.querySelector('.main-image');
                        const joinedBadge = document.createElement('div');
                        joinedBadge.className = 'joined-badge';
                        joinedBadge.innerHTML = '<i class="fas fa-check"></i> 已参加';
                        mainImageContainer.appendChild(joinedBadge);
                        
                        // 更新参与人数
                        document.querySelector('.participation-stats .stat-value:first-child').textContent = '43';
                        document.querySelector('.event-meta .meta-item:last-child span').textContent = '已有43人参加';
                        
                        // 添加到参与者列表
                        const participantsList = document.querySelector('.participants-list');
                        const newParticipant = document.createElement('div');
                        newParticipant.className = 'participant';
                        newParticipant.innerHTML = `
                            <img src="https://picsum.photos/200/200?random=999" alt="你的头像" class="participant-avatar">
                            <div class="participant-info">
                                <div class="participant-name">你 <span class="badge bg-primary text-white" style="font-size: 0.7rem;">你</span></div>
                                <div class="participant-meta">刚刚加入</div>
                            </div>
                            <div class="participant-actions">
                                <i class="fas fa-check"></i>
                            </div>
                        `;
                        participantsList.insertBefore(newParticipant, participantsList.children[1]);
                    }
                } else {
                    if (confirm('确定要取消参加"爵士音乐会，沉醉于蓝调之夜"吗？')) {
                        this.innerHTML = '<i class="fas fa-check-circle me-1"></i> 我要参加';
                        this.style.backgroundColor = '#ff4d6d';
                        
                        // 移除已参加标记
                        const joinedBadge = document.querySelector('.joined-badge');
                        if (joinedBadge) joinedBadge.remove();
                        
                        // 更新参与人数
                        document.querySelector('.participation-stats .stat-value:first-child').textContent = '42';
                        document.querySelector('.event-meta .meta-item:last-child span').textContent = '已有42人参加';
                        
                        // 从参与者列表移除
                        const yourParticipant = document.querySelector('.participant .badge.bg-primary').closest('.participant');
                        if (yourParticipant) yourParticipant.remove();
                    }
                }
            });
            
            // 分享按钮功能
            const shareButton = document.querySelector('.btn-share');
            shareButton.addEventListener('click', function() {
                const shareOptions = ['微信', '微博', 'QQ', '复制链接'];
                const shareText = '我发现了一个很棒的活动：爵士音乐会，沉醉于蓝调之夜，一起来参加吧！';
                
                let shareHTML = '<div class="share-options" style="position: absolute; z-index: 100; background: white; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); padding: 1rem; width: 200px;">';
                shareHTML += '<div style="font-weight: 600; margin-bottom: 0.5rem;">分享活动</div>';
                
                shareOptions.forEach(option => {
                    shareHTML += `<div style="display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; transition: background 0.2s; padding-left: 5px; border-radius: 4px;">`;
                    
                    if (option === '微信') {
                        shareHTML += `<i class="fab fa-weixin" style="color: #07C160;"></i>`;
                    } else if (option === '微博') {
                        shareHTML += `<i class="fab fa-weibo" style="color: #E6162D;"></i>`;
                    } else if (option === 'QQ') {
                        shareHTML += `<i class="fab fa-qq" style="color: #12B7F5;"></i>`;
                    } else if (option === '复制链接') {
                        shareHTML += `<i class="fas fa-link" style="color: #6b7280;"></i>`;
                    }
                    
                    shareHTML += `<span>${option}</span></div>`;
                });
                
                shareHTML += '</div>';
                
                // 移除之前的分享菜单
                const oldShareMenu = document.querySelector('.share-options');
                if (oldShareMenu) oldShareMenu.remove();
                
                // 添加新的分享菜单
                document.body.insertAdjacentHTML('beforeend', shareHTML);
                const shareMenu = document.querySelector('.share-options');
                
                // 定位分享菜单
                const rect = this.getBoundingClientRect();
                shareMenu.style.top = `${rect.bottom + window.scrollY + 10}px`;
                shareMenu.style.left = `${rect.left + window.scrollX}px`;
                
                // 点击分享选项
                shareMenu.querySelectorAll('div:not(:first-child)').forEach(item => {
                    item.addEventListener('click', function() {
                        const option = this.querySelector('span').textContent;
                        
                        if (option === '复制链接') {
                            navigator.clipboard.writeText(window.location.href).then(() => {
                                alert('链接已复制到剪贴板');
                            });
                        } else {
                            alert(`已选择通过${option}分享: ${shareText}`);
                        }
                        
                        shareMenu.remove();
                    });
                    
                    item.addEventListener('mouseenter', function() {
                        this.style.backgroundColor = '#f3f4f6';
                    });
                    
                    item.addEventListener('mouseleave', function() {
                        this.style.backgroundColor = 'transparent';
                    });
                });
                
                // 点击其他地方关闭分享菜单
                document.addEventListener('click', function closeShareMenu(e) {
                    if (!shareMenu.contains(e.target) && e.target !== shareButton) {
                        shareMenu.remove();
                        document.removeEventListener('click', closeShareMenu);
                    }
                });
            });
            
            // 留言点赞功能
            const likeButtons = document.querySelectorAll('.comment-action');
            likeButtons.forEach(btn => {
                if (btn.querySelector('.fa-heart')) {
                    btn.addEventListener('click', function(e) {
                        e.stopPropagation();
                        const icon = this.querySelector('i');
                        const countSpan = this.querySelector('span');
                        
                        if (icon.classList.contains('far')) {
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                            this.classList.add('liked');
                            countSpan.textContent = (parseInt(countSpan.textContent) + 1).toString();
                        } else {
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                            this.classList.remove('liked');
                            countSpan.textContent = (parseInt(countSpan.textContent) - 1).toString();
                        }
                    });
                }
            });
            
            // 回复功能
            const replyButtons = document.querySelectorAll('.reply-btn');
            replyButtons.forEach(btn => {
                btn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    // 找到最近的回复区
                    const repliesContainer = this.closest('.comment-content, .reply-content').querySelector('.replies') || 
                                           this.closest('.comment-content').querySelector('.reply-form').parentNode;
                    
                    // 隐藏所有回复框
                    document.querySelectorAll('.reply-form').forEach(form => {
                        form.style.display = 'none';
                    });
                    
                    // 显示当前回复框
                    const replyForm = this.closest('.comment-content, .reply-content').querySelector('.reply-form');
                    if (replyForm) {
                        replyForm.style.display = 'flex';
                        replyForm.querySelector('textarea').focus();
                    }
                });
            });
            
            // 发布回复
            const replyPostButtons = document.querySelectorAll('.btn-reply');
            replyPostButtons.forEach(btn => {
                btn.addEventListener('click', function() {
                    const replyForm = this.closest('.reply-form');
                    const textarea = replyForm.querySelector('textarea');
                    const replyText = textarea.value.trim();
                    
                    if (replyText) {
                        // 创建新回复
                        const newReply = document.createElement('div');
                        newReply.className = 'reply-item';
                        newReply.innerHTML = `
                            <img src="https://picsum.photos/200/200?random=999" alt="你的头像" class="user-avatar" style="width: 36px; height: 36px;">
                            <div class="reply-content">
                                <div class="comment-header">
                                    <div class="comment-author">你</div>
                                    <div class="comment-time">刚刚</div>
                                </div>
                                <div class="reply-text">
                                    ${replyText}
                                </div>
                                <div class="comment-actions">
                                    <div class="comment-action">
                                        <i class="far fa-heart"></i>
                                        <span>0</span>
                                    </div>
                                    <div class="comment-action reply-btn">
                                        <i class="far fa-comment"></i>
                                        <span>回复</span>
                                    </div>
                                </div>
                            </div>
                        `;
                        
                        // 添加到回复列表
                        const repliesContainer = replyForm.closest('.replies');
                        repliesContainer.insertBefore(newReply, replyForm);
                        
                        // 清空并隐藏回复框
                        textarea.value = '';
                        replyForm.style.display = 'none';
                        
                        // 为新回复绑定事件
                        bindReplyEvents(newReply);
                    }
                });
            });
            
            // 发布留言
            const postCommentButton = document.querySelector('.btn-post');
            postCommentButton.addEventListener('click', function() {
                const textarea = document.querySelector('.comment-input');
                const commentText = textarea.value.trim();
                
                if (commentText) {
                    // 创建新留言
                    const newComment = document.createElement('div');
                    newComment.className = 'comment-item';
                    newComment.innerHTML = `
                        <img src="https://picsum.photos/200/200?random=999" alt="你的头像" class="user-avatar">
                        <div class="comment-content">
                            <div class="comment-header">
                                <div class="comment-author">你</div>
                                <div class="comment-time">刚刚</div>
                            </div>
                            <div class="comment-text">
                                ${commentText}
                            </div>
                            <div class="comment-actions">
                                <div class="comment-action">
                                    <i class="far fa-heart"></i>
                                    <span>0</span>
                                </div>
                                <div class="comment-action reply-btn">
                                    <i class="far fa-comment"></i>
                                    <span>回复</span>
                                </div>
                            </div>
                            
                            <!-- 回复输入框 -->
                            <div class="reply-form" style="display: none;">
                                <textarea class="reply-input" rows="2" placeholder="回复..."></textarea>
                                <button class="btn-reply">回复</button>
                            </div>
                        </div>
                    `;
                    
                    // 添加到留言列表顶部
                    const commentsList = document.querySelector('.comments-list');
                    commentsList.insertBefore(newComment, commentsList.firstChild);
                    
                    // 清空留言框
                    textarea.value = '';
                    
                    // 更新留言计数
                    const commentsCount = document.querySelector('.comments-count');
                    const count = parseInt(commentsCount.textContent);
                    commentsCount.textContent = `${count + 1}条留言`;
                    
                    // 为新留言绑定事件
                    bindCommentEvents(newComment);
                }
            });
            
            // 取消留言
            document.querySelector('.btn-cancel').addEventListener('click', function() {
                document.querySelector('.comment-input').value = '';
            });
            
            // 加载更多留言
            document.querySelector('.btn-outline-secondary').addEventListener('click', function() {
                const spinner = this.querySelector('.fa-spinner');
                spinner.style.display = 'inline-block';
                this.disabled = true;
                
                // 模拟加载延迟
                setTimeout(() => {
                    spinner.style.display = 'none';
                    this.disabled = false;
                    this.textContent = '没有更多留言了';
                    this.classList.add('disabled');
                }, 1500);
            });
            
            // 绑定留言事件的辅助函数
            function bindCommentEvents(commentElement) {
                // 绑定点赞事件
                const likeBtn = commentElement.querySelector('.comment-action .fa-heart').closest('.comment-action');
                likeBtn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const icon = this.querySelector('i');
                    const countSpan = this.querySelector('span');
                    
                    if (icon.classList.contains('far')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('liked');
                        countSpan.textContent = '1';
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('liked');
                        countSpan.textContent = '0';
                    }
                });
                
                // 绑定回复事件
                const replyBtn = commentElement.querySelector('.reply-btn');
                replyBtn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    // 隐藏所有回复框
                    document.querySelectorAll('.reply-form').forEach(form => {
                        form.style.display = 'none';
                    });
                    
                    // 显示当前回复框
                    const replyForm = this.closest('.comment-content').querySelector('.reply-form');
                    replyForm.style.display = 'flex';
                    replyForm.querySelector('textarea').focus();
                    
                    // 绑定回复发布事件
                    const replyPostBtn = replyForm.querySelector('.btn-reply');
                    replyPostBtn.addEventListener('click', function() {
                        const textarea = replyForm.querySelector('textarea');
                        const replyText = textarea.value.trim();
                        
                        if (replyText) {
                            // 创建新回复
                            const newReply = document.createElement('div');
                            newReply.className = 'reply-item';
                            newReply.innerHTML = `
                                <img src="https://picsum.photos/200/200?random=999" alt="你的头像" class="user-avatar" style="width: 36px; height: 36px;">
                                <div class="reply-content">
                                    <div class="comment-header">
                                        <div class="comment-author">你</div>
                                        <div class="comment-time">刚刚</div>
                                    </div>
                                    <div class="reply-text">
                                        ${replyText}
                                    </div>
                                    <div class="comment-actions">
                                        <div class="comment-action">
                                            <i class="far fa-heart"></i>
                                            <span>0</span>
                                        </div>
                                        <div class="comment-action reply-btn">
                                            <i class="far fa-comment"></i>
                                            <span>回复</span>
                                        </div>
                                    </div>
                                </div>
                            `;
                            
                            // 添加到回复列表
                            commentElement.querySelector('.comment-content').insertBefore(newReply, replyForm);
                            
                            // 清空并隐藏回复框
                            textarea.value = '';
                            replyForm.style.display = 'none';
                            
                            // 为新回复绑定事件
                            bindReplyEvents(newReply);
                        }
                    });
                });
            }
            
            // 绑定回复事件的辅助函数
            function bindReplyEvents(replyElement) {
                // 绑定点赞事件
                const likeBtn = replyElement.querySelector('.comment-action .fa-heart').closest('.comment-action');
                likeBtn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const icon = this.querySelector('i');
                    const countSpan = this.querySelector('span');
                    
                    if (icon.classList.contains('far')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('liked');
                        countSpan.textContent = '1';
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('liked');
                        countSpan.textContent = '0';
                    }
                });
                
                // 绑定回复事件
                const replyBtn = replyElement.querySelector('.reply-btn');
                replyBtn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    // 隐藏所有回复框
                    document.querySelectorAll('.reply-form').forEach(form => {
                        form.style.display = 'none';
                    });
                    
                    // 找到最近的回复容器
                    const repliesContainer = this.closest('.replies');
                    
                    // 如果没有回复框，则创建一个
                    let replyForm = repliesContainer.querySelector('.reply-form');
                    if (!replyForm) {
                        replyForm = document.createElement('div');
                        replyForm.className = 'reply-form';
                        replyForm.style.display = 'none';
                        replyForm.innerHTML = `
                            <textarea class="reply-input" rows="2" placeholder="回复..."></textarea>
                            <button class="btn-reply">回复</button>
                        `;
                        repliesContainer.appendChild(replyForm);
                        
                        // 绑定回复发布事件
                        const replyPostBtn = replyForm.querySelector('.btn-reply');
                        replyPostBtn.addEventListener('click', function() {
                            const textarea = replyForm.querySelector('textarea');
                            const replyText = textarea.value.trim();
                            
                            if (replyText) {
                                // 创建新回复
                                const newReply = document.createElement('div');
                                newReply.className = 'reply-item';
                                newReply.innerHTML = `
                                    <img src="https://picsum.photos/200/200?random=999" alt="你的头像" class="user-avatar" style="width: 36px; height: 36px;">
                                    <div class="reply-content">
                                        <div class="comment-header">
                                            <div class="comment-author">你</div>
                                            <div class="comment-time">刚刚</div>
                                        </div>
                                        <div class="reply-text">
                                            ${replyText}
                                        </div>
                                        <div class="comment-actions">
                                            <div class="comment-action">
                                                <i class="far fa-heart"></i>
                                                <span>0</span>
                                            </div>
                                            <div class="comment-action reply-btn">
                                                <i class="far fa-comment"></i>
                                                <span>回复</span>
                                            </div>
                                        </div>
                                    </div>
                                `;
                                
                                // 添加到回复列表
                                repliesContainer.insertBefore(newReply, replyForm);
                                
                                // 清空并隐藏回复框
                                textarea.value = '';
                                replyForm.style.display = 'none';
                                
                                // 为新回复绑定事件
                                bindReplyEvents(newReply);
                            }
                        });
                    }
                    
                    // 显示回复框
                    replyForm.style.display = 'flex';
                    replyForm.querySelector('textarea').focus();
                });
            }
        });
    </script>
</body>
</html>

